package beans;

import com.google.gson.Gson;

public class TaskBean {
	private int id;
	private int userStoryId;
	private String name;
	private String description;
	private float estimate;
	private int statusId;
	private String statusName;
	private int assignedToId;
	private String assignedTo;
	
	public int getId() {
		return id;
	}
	
	public void setId(int id) {
		this.id = id;
	}
	
	public int getUserStoryId() {
		return userStoryId;
	}
	
	public void setUserStoryId(int userStoryId) {
		this.userStoryId = userStoryId;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getDescription() {
		return description;
	}
	
	public void setDescription(String description) {
		this.description = description;
	}
	
	public float getEstimate() {
		return estimate;
	}
	
	public void setEstimate(float estimate) {
		this.estimate = estimate;
	}
	
	public int getStatusId() {
		return statusId;
	}
	
	public void setStatusId(int status_id) {
		this.statusId = status_id;
	}
	
	public String getStatusName() {
		return statusName;
	}
	
	public void setStatusName(String status_name) {
		this.statusName = status_name;
	}
	
	public int getAssignedToId() {
		return assignedToId;
	}
	
	public void setAssignedToId(int assignedToId) {
		this.assignedToId = assignedToId;
	}
	
	public String getAssignedTo() {
		return assignedTo;
	}
	
	public void setAssignedTo(String assignedTo) {
		this.assignedTo = assignedTo;
	}

	public String getJson() {
		StringBuffer sb = new StringBuffer();
		Gson gson = new Gson();
		
		sb.append("{");
		sb.append("\"task_id\": " + gson.toJson(id) + ",");
		sb.append("\"user_story_id\": " + gson.toJson(userStoryId) + ",");
		sb.append("\"task_name\": " + gson.toJson(name) + ",");
		sb.append("\"task_description\": " + gson.toJson(description) + ",");
		sb.append("\"task_estimate\": " + gson.toJson(estimate) + ",");
		sb.append("\"task_status_id\": " + gson.toJson(statusId) + ",");
		sb.append("\"task_status_name\": " + gson.toJson(statusName) + ",");
		sb.append("\"task_assigned_to_id\": " + gson.toJson(assignedToId) + ",");
		sb.append("\"task_assigned_to_name\": " + gson.toJson(assignedTo));
		sb.append("}");

		return sb.toString();
	}
	
}
